package engine.systems.spatial.edge
{
	import ash.core.Component;
	
	import flash.geom.Rectangle;
	
	public class Edge extends Component
	{
		public var left:Number;
		public var top:Number;
		public var right:Number;
		public var bottom:Number;
		
		internal var _scaledLeft:Number;
		internal var _scaledTop:Number;
		internal var _scaledRight:Number;
		internal var _scaledBottom:Number;
		
		public function Edge(left:Number = 0, top:Number = 0, right:Number = 0, bottom:Number = 0)
		{
			this.left 	= left;
			this.top 	= top;
			this.right 	= right;
			this.bottom = bottom;
			
			this._scaledLeft 	= left;
			this._scaledTop 	= top;
			this._scaledRight 	= right;
			this._scaledBottom 	= bottom;
		}
		
		public function get scaledLeft():Number 	{ return this._scaledLeft; }
		public function get scaledTop():Number 		{ return this._scaledTop; }
		public function get scaledRight():Number 	{ return this._scaledRight; }
		public function get scaledBottom():Number 	{ return this._scaledBottom; }
		
		public function get width():Number 	{ return this.left + this.right; }
		public function get height():Number { return this.top + this.bottom; }
		
		public function get scaledWidth():Number 	{ return this._scaledLeft + this._scaledRight; }
		public function get scaledHeight():Number 	{ return this._scaledTop + this._scaledBottom; }
	}
}